package pc29;

import java.util.Scanner;

public class J09SungJuk {
	public static void main(String[] args) {
		String name[] = new String[1];
		int kor[] = new int[1];
		int eng[] = new int[1];
		int mat[] = new int[1];
		int tot[] = new int[1];
		double avg[] = new double[1];
		char grd[] = new char[1];
		Scanner sc = new Scanner(System.in);

		InputSungJuk(sc, name, kor, eng, mat);
		getTotal(tot, kor, eng, mat);
		getAvgerage(tot, avg);
		getGrade(avg, grd);

		System.out.println(name);
		System.out.println(name[0]);
		System.out.println(kor[0]);
		System.out.println(eng[0]);
		System.out.println(mat[0]);
		System.out.println(tot[0]);
		System.out.println(avg[0]);
		System.out.println(grd[0]);

	} // main

	public static void InputSungJuk(Scanner sc, String[] name, int[] kor,
			int[] eng, int[] mat) {

		sc = new Scanner(System.in);
		System.out.println("이름 입력해");
		name[0] = sc.next();
		System.out.println("국영수 점수 입력해");
		kor[0] = sc.nextInt();
		eng[0] = sc.nextInt();
		mat[0] = sc.nextInt();
		sc.close();
	}

	public static void getTotal(int[] tot, int[] kor, int[] eng, int[] mat) {
		tot[0] = kor[0] + eng[0] + mat[0];
	}

	public static void getAvgerage(int[] tot, double[] avg) {
		avg[0] = (double) tot[0] / 3;
	}

	public static void getGrade(double[] avg, char[] grd) {
		switch ((int) avg[0] / 10) {
		case 10:
		case 9:
			grd[0] = '수';
			break;
		case 8:
			grd[0] = '우';
			break;
		case 7:
			grd[0] = '미';
			break;
		case 6:
			grd[0] = '양';
			break;
		default:
			grd[0] = '가';
		}
	}
}
